package M360;

import java.util.Scanner;

/**
 * @author zhangmin
 * @create 2022-03-19 15:50
 */
public class M360_0319_1 {

    //先打没有宝物的关卡,有宝物的从价值高到低
    public static void main(String[] args) {
        Scanner cin=new Scanner(System.in);
        int n=cin.nextInt();
        int[] a=new int[n];
        int[] b=new int[n];
        for (int i = 0; i < n; i++) {
            a[i]=cin.nextInt();
        }
        for (int i = 0; i < n; i++) {
            b[i]=cin.nextInt();
        }
        int res=0;
        for (int i = 0; i < n; i++) {
            if(b[i]==0){
                //res+=
            }
        }
    }
}
